package com.it.plic;

import java.io.IOException;
import java.net.*;
import java.util.Scanner;

/**
 * @author げっしょく
 * @date 2021/8/8
 */
public class Demo2 {
    public static void main(String[] args) throws IOException {
        DatagramSocket ds = new DatagramSocket();
        Scanner sc = new Scanner(System.in);
        String s;
        byte[] b;
        InetAddress ad = InetAddress.getByName("127.0.0.1");
        DatagramPacket dp;
        while (true) {
            s = sc.nextLine();
            if ("886".equals(s)){
                break;
            }
            b = s.getBytes();
            dp = new DatagramPacket(b, b.length, ad, 10000);
            ds.send(dp);
        }
        ds.close();
    }
}
